# coding: utf-8
"""
__init__.py

difining databases

Created by Daniel Yang on 2011-02-22.
Copyright (c) 2011 __MyCompanyName__. All rights reserved.
"""

from settings import settings

#### databases
members_db = settings['mongo'].ide_member.members

fuguang_db = settings['mongo'].fuguang.fuguang
rate_db = settings['mongo'].ide_rate.rates
comment_db = settings['mongo'].ide_comment.comments

sections_db = settings['mongo'].ide.sections
nodes_db = settings['mongo'].ide.nodes
topics_db = settings['mongo'].ide_topic.topics
replies_db = settings['mongo'].ide_reply.replies
topic_views_db = settings['mongo'].ide_tv.topic_views
fav_db = settings['mongo'].ide_fav.favs
follows_db = settings['mongo'].ide_follow.follows


redis = settings['redis']
#### Const for cache keys.
cache_accounts = 'fm.ide.cache.accounts'

cache_hot_nodes = 'fm.ide.cache.hot.notes'
cache_tags = 'fm.ide.cache.tags.%s'
cache_tag_could = 'fm.ide.cache.tag.cloud'
cache_sections = 'fm.ide.cache.sections'
cache_pi = 'fm.ide.cache.pi.%s'
cache_node_acl = 'fm.ide.cache.node.acl.%s'

cache_user_timeline = 'fm.ide.cache.tl.%s'
cache_user_notify = 'fm.ide.cache.notify.%s'

cache_topic_replier = 'fm.ide.cache.topic.replier.%s'
